package 二叉树.练习;
//反转树
import 二叉树.基础.TreeNode;

public class Text_3 {
    public TreeNode inverseTree(TreeNode root){
        if(root ==null){
            return null;
        }
        TreeNode tmp = root.left;
        root.left = root.right;
        root.right = tmp;

        inverseTree(root.left);
        inverseTree(root.right);
        return root;
    }
}
